<template>
	<view>
		pinia
		{{ count }}
		<button @click="handleClick">点击按钮</button>
	</view>
</template>

<script setup>
	import { computed, ref, watchEffect } from "vue";
	import { useCounterStore } from '@/stores/todo';
	
	let counter = useCounterStore()
	
	const count = computed(() => {
	  return counter.count
	})
	console.log(123, counter)
	
	// 点击递增
	function handleClick () {
		counter.increment()
	}
	
</script>

<style>
	       
</style>
